
// @Tags systrm
// @Summary 获取配置文件内容
// @Security ApiKeyAuth
// @Produce  application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /system/getSystemConfig [post]
// export const getSystemConfig = () => {
//   return service({
//     url: '/system/getSystemConfig',
//     method: 'post'
//   })
// }

// // @Tags system
// // @Summary 设置配置文件内容
// // @Security ApiKeyAuth
// // @Produce  application/json
// // @Param data body sysModel.System true
// // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// // @Router /system/setSystemConfig [post]
// export const setSystemConfig = (data) => {
//   return service({
//     url: '/system/setSystemConfig',
//     method: 'post',
//     data
//   })
// }

// // @Tags system
// // @Summary 获取服务器运行状态
// // @Security ApiKeyAuth
// // @Produce  application/json
// // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// // @Router /system/getServerInfo [post]
// export const getSystemState = () => {
//   return service({
//     url: '/system/getServerInfo',
//     method: 'post',
//     donNotShowLoading: true
//   })
// }

import request from '@/utils/request'

// @Tags api
// @Summary 用户登录
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "用户登录"
// @Success 200 {string} json "{"code":0,"data":{"UserName": "string","Account": "string","OperationType": "string","CreateTime": "string"},"msg":"获取成功"}"
// @Router /api/system/user/login [post]
export const logIn = (data) => {
  return request({
    url: '/app/home/login',
    method: 'post',
    data
  })
}

// @Summary 获取图片验证码
// @Success 200 {string} json "{"code":0,"data":{ "data": {"Id": "string","Image": "string"}},"msg":""}"
// @Router /api/system/captcha/get [Get]
export const captcha = (data) => {
  return request({
    url: '/api/system/captcha/get',
    method: 'Get',
    data
  })
}

// @Summary 退出登录
// @Success 200 {string} json "{"code":0,"msg":""}"
// @Router /api/system/user/logout [get]
export const logOut = (data) => {
  return request({
    url: '/api/system/user/logout',
    method: 'Get',
    data
  })
}

// @Summary 获取菜单权限
// @Success 200 {string} json "{"code":0,"msg":""}"
// @Router /api/system/password/update [get]
export const getMenu = (data) => {
  return request({
    url: '/api/system/menu/list',
    method: 'Get',
    data
  })
}

// @Summary 修改密码
// @Success 200 {string} json "{"code":0,"msg":""}"
// @Router /api/system/password/update [Post]
export const updatePassword = (data) => {
  return request({
    url: '/api/system/password/update',
    method: 'Post',
    data
  })
}

// @Summary 修改地址
// @Success 200 {string} json "{"code":0,"msg":""}"
// @Router /api/system/address/update [Post]
export const updateAddress = (data) => {
  return request({
    url: '/api/system/address/update',
    method: 'Post',
    data
  })
}

// @Summary 获取地址
// @Success 200 {string} json "{"code":0,"msg":""}"
// @Router /api/system/address/update [Post]
export const getAddress = () => {
  return request({
    url: '/api/system/address/get',
    method: 'Get'
  })
}
export const getmenulist = () => {
  return request({
    url: '/api/system/all/menu/list',
    method: 'Get',
  })
}
export const getusermenulist = () => {
  return request({
    url: '/api/system/user/menu/list',
    method: 'Get',
  })
}